<%@include file="menu/util.jsp" %>
<%@page contentType="text/html; charset=iso-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="dimensionMembers" value="${requestScope.dimensionMembers}" />
<c:set var="checkedDimensionMembers" value="${requestScope.checkedDimensionMembers}" />
<fmt:bundle basename="app">
    <table style="table-layout:fixed;" width="100%">
        <c:forEach var="dms" items="${dimensionMembers}" varStatus="status">
            <c:set var="chk_value" value="" />
            <c:set var="chk_label" value="" />
            <c:forEach varStatus="i" var="dimensionMember" items="${dms}">
                <c:set var="chk_label">${chk_label} ${dimensionMember.name}${!i.last ? ' / ' : ''}</c:set>
                <c:set var="chk_value">${chk_value}${dimensionMember.idDimensionMember}${!i.last ? '_' : ''}</c:set>
            </c:forEach>
              <c:if test="${status.count % 2 == 1}">
                <tr>
              </c:if>
                <td width="4%">
                    <c:choose>
                        <c:when test="${checkedDimensionMembers != null && checkedDimensionMembers[dms]}">
                            <input name="dimensionalCut" type="checkbox" checked="checked" value="${chk_value}" id="checkbox-${status.count}" />
                        </c:when>
                        <c:otherwise>
                            <input name="dimensionalCut" type="checkbox" checked="checked" value="${chk_value}" id="checkbox-${status.count}" />
                        </c:otherwise>
                    </c:choose>
                 </td>
                <td width="46%"><label for="checkbox-${status.count}" class="input">${chk_label}</label></td>
              <c:if test="${status.count % 2 == 0}">
                </tr>
              </c:if>
            </c:forEach>

    </table>
</fmt:bundle>

